package com.qf.order.mapper;

import com.qf.order.domain.*;
import com.qf.order.domain.dto.OrderExcelDTO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderMapper {
    String selectLastOrderId();

    int addOrderBasic(OrderBasic orderBasic);

    int addOrderRemark(OrderRemark orderRemark);

    int addGoodsInfo(List<GoodsInfo> goodsList);

    int addCostInfo(CostInfo costInfo);

    int addPaymentMethod(PaymentMethod paymentMethod);

    int addVehicleRequirement(VehicleRequirement vehicleRequirement);


    List<OrderVO> selectOrderList();

    List<OrderBasic> selectOrderBasicList(OrderVO orderVO);

    List<GoodsInfo> selectGoodsInfo(String orderId);

    CostInfo selectCostInfo(String orderId);

    PaymentMethod selectPaymentMethod(String orderId);

    VehicleRequirement selectVehicleRequirement(String orderId);


    OrderRemark selectOrderRemark(String orderId);

    int delOrderRemark(String[] orderIds);

    int delOrderBasic(String[] orderIds);

    int delGoodsInfo(String[] orderIds);

    int delCostInfo(String[] orderIds);

    int delPaymentMethod(String[] orderIds);

    int delVehicleRequirement(String[] orderIds);

    int updateOrderBasic(OrderBasic orderBasic);

    int updateOrderRemark(OrderRemark orderRemark);

    int updateGoodsInfo(List<GoodsInfo> goodsList);

    int updateCostInfo(CostInfo costInfo);

    int updatePaymentMethod(PaymentMethod paymentMethod);

    int updateVehicleRequirement(VehicleRequirement vehicleRequirement);

    OrderBasic getOrderBasic(String orderId);

    OrderRemark getOrderRemark(String orderId);

    List<GoodsInfo> getGoodsList(String orderId);

    CostInfo getCostInfo(String orderId);

    PaymentMethod getPaymentMethod(String orderId);

    VehicleRequirement getVehicleRequirement(String orderId);

    int delGoods(GoodsInfo goodsInfo);
    /**
     * 根据条件查询订单
     */
    List<OrderExcelDTO> selectByParams(OrderQueryParams params);

    /**
     * 批量插入订单
     */
    int batchInsert(List<Order> orderList);

    /**
     * 分页查询订单
     */
    List<Order> selectPage(OrderQueryParams params);

    /**
     * 查询总记录数
     */
    int selectCount(OrderQueryParams params);

    List<OrderExcelDTO> selectByOrderIds(List<String> orderIds);
}
